{ "cells": [ { "cell_type": "markdown", "source": [ "# Professors Xavier's School for Gifted Youngsters\n", "## Problem Definition\n", "Professor Xavier's School for Gifted Youngsters is organizing a special summer session focusing on enhancing the students' unique abilities. Students from across the country have been invited, and the school needs to arrange their transportation. The goal is to ensure that all students can arrive at the school in time for the session while minimizing transportation costs.\n", "\n", "1. First, let us consider an abstract model where gifted students reside in $n$ different locations, can can be transported in $m$ different modes of transport. Each mode of transport from each location to the school has a different associated cost. Additionally, each transportation mode has a different capacity, and each location has a different number of gifted students that need transportation to the school. Write down an Integer Programming (IP) problem that minimizes the overall transportation costs.\n", "\n", "**Index**\n", "- $i \\in \\{1, 2, ..., n\\}$: Index for the locations\n", "- $j \\in \\{1, 2, ..., m\\}$: Index for the modes of transport\n", "\n", "**Decision Variables:**\n", "- $x_{ij}$: Number of students transported from location $i$ to the school using mode of transport $j$. $x_{ij}$ is an integer variable.\n", "\n", "**Objective Function:**\n", "Minimize the total transportation cost:\n", "\n", "$\\min z = \\sum_{i=1}^{n} \\sum_{j=1}^{m} c_{ij}x_{ij}$\n", "\n", "Where $c_{ij}$ is the cost of transporting a student from location $i$ to the school using mode of transport $j$.\n", "\n", "**Constraints:**\n", "\n", "1. Ensure that all students are transported to the school:\n", "\n", "$\\sum_{j=1}^{m} x_{ij} = s_i, \\forall i \\in \\{1, 2, ..., n\\}$\n", "\n", "Where $s_i$ is the number of students at location $i$.\n", "\n", "2. Ensure that the capacity of each mode of transport is not exceeded:\n", "\n", "$\\sum_{i=1}^{n} x_{ij} \\leq t_j, \\forall j \\in \\{1, 2, ..., m\\}$\n", "\n", "Where $t_j$ is the capacity of mode of transport $j$.\n", "\n", "\n", "2. Given the following number of students:\n", "\n", "| Location | Number of Students |\n", "|----------|--------------------|\n", "| L1 | 20 |\n", "| L2 | 30 |\n", "| L3 | 25 |\n", "| L4 | 15 |\n", "| L5 | 40 |\n", "| L6 | 35 |\n", "\n", "And the following capacities and costs of transport per student from the different locations for three different modes of transport:\n", "\n", "| Mode | Capacity | L1 | L2 | L3 | L4 | L5 | L6 |\n", "|------|----------|----|----|----|----|----|----|\n", "| T1 | 50 | 10 | 8 | 12 | 11 | 9 | 7 |\n", "| T2 | 60 | 9 | 7 | 11 | 10 | 8 | 6 |\n", "| T3 | 40 | 8 | 9 | 10 | 12 | 7 | 11 |\n", "\n", "Draw a graph that allows to model the transportation problem as a maximum flow at minimum cost transportation problem." ], "metadata": { "collapsed": false } } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.6" } }, "nbformat": 4, "nbformat_minor": 0 }